"""
输入M和N计算C(M,N)

Version: 0.1
Author: yuwl
Date: 2023-12-14
"""

m = int(input('m = '))
n = int(input('n = '))
fm = 1
for num in range(1, m + 1):
	fm *= num
fn = 1
for num in range(1, n + 1):
	fn *= num
fm_n = 1
for num in range(1, m - n + 1):
	fm_n *= num
print(fm // fn // fm_n)

# 函数-求阶乘
def cmn(n):
	sum = 1
	for num in range(1, n + 1):
		sum *= num
	return sum

fm = cmn(m)
fn = cmn(n)
fm_n = cmn(m - n)
print(fm // fn // fm_n)